package com.lzx.es.feign;

import com.lzx.es.entity.articleVO.Articles;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author 程序员星星
 * @date 2023/2/9
 * @Description
 */
@Component
@FeignClient("five-cube-article")
public interface ArticleClient {

    //用户修改头像或昵称 es同步
    @GetMapping("/article/articles/web/getUserArticleListToES/{userId}")
    List<Articles> getUserArticleListToES(@PathVariable Long userId);

    //查询文章
    @GetMapping("/article/articles/web/getArticleToOther/{id}")
    Articles getArticleToOther(@PathVariable Long id);

    //获取所有文章
    @GetMapping("/article/articles/web/getArticleListToES")
    List<Articles> getArticleListToES();
}
